home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr15 / rtag10.zip / TOUR.RTA < prev    next >
Text File  |  1993-05-24  |  2KB  |  50 lines

  1. //  Animated tour around some buildings
  2.  
  3. //  File declarations
  4. bfile tour        // Batch file
  5. //  Variable declarations.
  6. var lastframe = 260    // Generate 260 frame animation
  7. var x            // X position
  8. var y            // Y position
  9. var z            // Z position
  10. var xlook        // X to look at
  11. var ylook        // Y to look at
  12. var zlook        // Z to look at
  13.  
  14. //  Main animation loop
  15. while (curframe < lastframe) do
  16.     nextframe        // Begin a new frame
  17.     //  Determine position
  18.     x = spline(curframe, 1,22,  15,14, 30,6,  45,2,  60,-6, \\
  19.                  75,1,  90,2, 105,4, 120,6, 135,6, 150,4, \\
  20.                  170,-4, 185,-8, 200,-4, 215,-1, 230,2, \\
  21.                  240,4, 260,12);
  22.     y = spline(curframe, 1,15,  15,12, 30,6,  45,2,  60,1, \\
  23.                  75,2,  90,2, 170,2, 200,2, 230,4, 240,8, 260,18);
  24.     z = spline(curframe, 1,-18, 15,-2, 30,-1, 45,-3, 60,0, \\
  25.                  75,2,  90,-4, 105,-6, 120,-3, 135,3, \\
  26.                  150,6, 170,8, 185,6, 200,2, 215,-4, \\
  27.                  230,-2, 240,0, 260,0);
  28.     //  Determine where to look
  29.     xlook = spline(curframe, 1,0, 30,-8, 45,-8, 60,-7, 75,9, 90,4, \\
  30.                  105,4, 120,0, 200,0, 260,0);
  31.     ylook = spline(curframe, 1,2, 260,2);
  32.     zlook = spline(curframe, 1,0, 30,0,  45,0,  60,6,  75,-4, 90,-4, \\
  33.                  120,0, 150,0, 200,0, 260,0);
  34.     // Print our position
  35.     print "Frame %3.0lf, pos=(%4.1lf,%4.1lf,%4.1lf), look=(%4.1lf,%4.1lf,%4.1lf)",\\
  36.         curframe,x,y,z,xlook,ylook,zlook
  37.     //  Write position commands to the include file
  38.     bwrite "echo #declare xpos = `x` > tour.inc"
  39.     bwrite "echo #declare ypos = `y` >> tour.inc"
  40.     bwrite "echo #declare zpos = `z` >> tour.inc"
  41.     bwrite "echo #declare xlook = `xlook` >> tour.inc"
  42.     bwrite "echo #declare ylook = `ylook` >> tour.inc"
  43.     bwrite "echo #declare zlook = `zlook` >> tour.inc"
  44.     //  Write command to render the frame image
  45.     bwrite "call render tour tour`###`"
  46. endwhile
  47. //  Write final batch command to run DTA
  48. epilog
  49. bwrite "call dodta TOUR /S8"
  50.